﻿using SosForms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using System.Data.Entity;

using SosData;
namespace UOCmaker
{
    public partial class FormTablaTipologia : FormBase
    {

        sosContext db = null;
        /// <summary>
        /// Contructor
        /// </summary>
        public FormTablaTipologia()
        {
            InitializeComponent();
        }

        #region " Metodos "

        /// <summary>
        /// aceptar cambios
        /// </summary>
        private void Aceptar()
        {
            db.SaveChanges();
            this.Close();
        }

        #endregion

        #region " Controles "

        #endregion


        private void FormTablaTipologia_Load(object sender, EventArgs e)
        {
            db = new sosContext();
            db.tipologias.Load();
            bindingSource.DataSource = db.tipologias.Local.ToBindingList() ;
        }

        private void butCancelar_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void butAceptar_Click(object sender, EventArgs e)
        {
            Aceptar();
        }
    }
}
